package Waya::App::Resize;

use warnings;
use strict;

our $VERSION = '0.1';

use base 'Waya::App::FileIterator';


use constant GETOPT => (qw/size=s anchor=s/);


sub check_options {
    my $self = shift;
    die "--size ?\n" unless $self->opt->{size};
}


sub process_game {
    my $self = shift;
    $self->game->resize(
        $self->opt->{size},
        $self->opt->{anchor} || $self->game->get_anchor
    );
}


1;
